<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="forms"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<script type="text/javascript" src="resources/style/scripts/ValidationCreateUser.js"></script>

<div style="margin-left: 40%">
	<div >
	<h3><spring:message code="createuser" text="default text" /></h3> 
    </div>
    <h3>
  		 <strong><spring:message code="${message}" text="" /> </strong>
 	</h3>
    <form name="form" action="createUser" >
    
    <p><input type="text" name="name" placeholder="<spring:message code="content.createTripForm.name" text="default text" /> " ></p>
    <div class="alert alert-danger" id="errorName" style="display: none;" ><spring:message code="name1.required" text="default text" /></div>
    <p><input type="text" name="surname" placeholder="<spring:message code="create.user.form.surname" text="default text" />" ></p>
    <div class="alert alert-danger" id="errorSurname" style="display: none;" ><spring:message code="surname.required" text="default text" /></div>
    <p>
    <input type="radio" name="role" value="MANAGER" ><spring:message code="create.user.form.role.manager" text="default text" />
    <input type="radio" name="role" value="DRIVER" ><spring:message code="create.user.form.role.driver" text="default text" />
    <input type="radio" name="role" value="ADMIN" ><spring:message code="create.user.form.role.admin" text="default text" />
    </p>
    <div class="alert alert-danger" id="errorRole" style="display: none;" ><spring:message code="role.required" text="default text" /></div>
    <p><input type="text" name="login" placeholder="<spring:message code="create.user.form.login" text="default text" />"></p>
    <div class="alert alert-danger" id="errorLogin" style="display: none;" ><spring:message code="name.required" text="default text" /></div>
    <p><input type="text" name="password" placeholder="<spring:message code="create.user.form.password" text="default text" />"></p>
    <div class="alert alert-danger" id="errorPassword" style="display: none;" ><spring:message code="password.required" text="default text" /></div>
    <input type="submit" onclick="validate()" value="<spring:message code="content.button.Save" text="default text"  />">
 	</form>
 </div>